<template>
	<view class="prefer-content">
		<!-- 标题 -->
		<view class="prefer-title">
			为你优选
		</view>
		<scroll-view class="scroll" scroll-x="true" scroll-with-animation="true">
			<view class="prefer-dis">
				<block v-for="(item,index) in preferenceList" :key="index">
					<view class="prefer-view">
						<image :src="item.image" mode=""></image>
						<text>{{item.title}}</text>
						<text>{{item.lable}}</text>
					</view>
				</block>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		props:{
			preferenceList:Array
		},
		data() {
			return {
				
			}
		},
		methods: {
			
		}
	}
</script>

<style scoped>
	.prefer-content{
		margin: 20rpx 15rpx;
	}
	.prefer-title{
		font-size: 35rpx;
		height: 50rpx;
		line-height: 50rpx;
		margin-bottom: 20rpx;
	}
	.scroll{
		width: 100%;
		height: 300rpx;
	}
	.prefer-dis{
		display: flex;
		justify-content: space-between;
	}
	.prefer-view{
		width: 300rpx;
		height: 300rpx;
		padding: 0 8rpx; 
	}
	.prefer-view image{
		width: 300rpx;
		height: 200rpx;
		border-radius: 8rpx;
	}
	.prefer-view text{
		height: 45rpx;
		line-height: 45rpx;
		/*若一行显示不完，用省略号隐藏  */
		display: -webkit-box;
		-webkit-box-orient:vertical;
		-webkit-line-clamp:1;
		overflow: hidden;
	}
	.prefer-view text:nth-child(2){
		font-size: 30rpx;
	}
	.prefer-view text:nth-child(3){
		color: #9c9c9c;
		font-size: 27rpx;
	}
	/* .prefer-dis view:nth-child(2){
		padding: 0 7rpx;
	} */
</style>
